package edu.njust.httpmanager.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @TableName api
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value ="api")
public class Api implements Serializable {
    private Long id;

    private Long programId;

    private Long catalogId;

    private String name;

    private String description;

    private String method;

    private String url;

    private String requestParams;

    private String requestHeaders;

    private String requestBody;

    private String responseData;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField(select = false)
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}